#ifndef __WRAP_DIRECTINPUTEFFECT__
#define __WRAP_DIRECTINPUTEFFECT__

#include "game_server.h"

class WrapperDirectInputEffect:public IDirectInputEffect{
private:
	IDirectInputEffect * m_ie;
	int id;
	static HashSet m_list;
public:
	static int ins_count;
	WrapperDirectInputEffect(IDirectInputEffect * ptr,int _id);
	int GetID();
	void SetID(int id);
	IDirectInputEffect* GetIDirectInputEffect();
	static WrapperDirectInputEffect * GetWrapperDirectInputEffect(IDirectInputEffect *ptr);

public:
	/* IUnknown methods*/
	COM_METHOD(HRESULT, QueryInterface)(THIS_ REFIID riid, void ** ppvObj);
	COM_METHOD(ULONG,AddRef)(THIS);
	COM_METHOD(ULONG,Release)(THIS);

	/* IDirectInputEffect Methods*/
	COM_METHOD(HRESULT, Download)(THIS);

	COM_METHOD(HRESULT, Escape)(THIS_ LPDIEFFESCAPE pesc);

	COM_METHOD(HRESULT, GetEffectGuid)(THIS_ LPGUID pguid);

	COM_METHOD(HRESULT, GetEffectStatus)(THIS_ LPDWORD pdwFlags);

	COM_METHOD(HRESULT, GetParameters)(THIS_ LPDIEFFECT peff,
		DWORD dwFlags);

	COM_METHOD(HRESULT, Initialize)(THIS_ HINSTANCE hinst,
		DWORD dwVersion,
		REFGUID rguid);


	COM_METHOD(HRESULT, SetParameters)(THIS_ LPCDIEFFECT peff,
		DWORD dwFlags);


	COM_METHOD(HRESULT, Start)(THIS_ DWORD dwIterations,
		DWORD dwFlags);

	COM_METHOD(HRESULT, Stop)(THIS);

	COM_METHOD(HRESULT, Unload)(THIS);
};

#endif